import { LayerTypeFE } from '../../../../../../../../constant';

export const MAX_IMAGE_SIZE = 10 * 1024 * 1024; // 10MB

export const MAX_IMAGE_WIDTH = 6000;
export const MAX_IMAGE_HEIGHT = 6000;

export const MIN_IMAGE_EDGE = 20;

const generalShapeData = {
  left: 100,
  top: 100,
  angle: 0,
  width: 200,
  height: 200,
  fill: '#666666',
  stroke: '#666666',
  borderOpacity: 1,
  border: '#666666',
  data: {
    rotation: 0,
    graphics: {
      fillColor: '#666666',
      transparency: 1,
      borderColor: '#666666',
      borderOpacity: 1,
      borderRadius: 0
    }
  }
};

export const initialShapeDataByType = {
  [LayerTypeFE.Rect]: {
    ...generalShapeData,
    rx: 0,
    ry: 0
  },
  [LayerTypeFE.Ellipse]: {
    ...generalShapeData,
    rx: 100,
    ry: 100
  },
  [LayerTypeFE.Triangular]: {
    ...generalShapeData,
    radius: 0
  },
  [LayerTypeFE.Arrow]: generalShapeData,
  [LayerTypeFE.Line]: generalShapeData
};
